<template>
  <div>
    <Row class="Row2">
      <i-col :sm="24" :md="8" :span="8">
        <div class="icol">
          <div class="ico1Title">今日乌北站发出车数</div>
          <div class="icolCount">{{topObject.trainCountToday}}</div>
        </div>
      </i-col>
      <!--<i-col :sm="24" :md="6" :span="6">
        <div class="icol">
          <div class="ico1Title">今日卸车总数</div>
          <div class="icolCount">{{}}</div>
        </div>
      </i-col>-->
      <i-col :sm="24" :md="8" :span="8">
        <div class="icol">
          <div class="ico1Title">今日主要运输品类</div>
          <div class="icolCount">{{topObject.categoryToday?topObject.categoryToday:'暂无数据'}}</div>
        </div>
      </i-col>
      <!--<i-col :sm="24" :md="8" :span="8">
        <div class="icol">
          <div class="ico1TitleLast">今日主要到站</div>
          <div class="icolCountLast">{{topObject.fzToday?topObject.fzToday:'暂无数据'}}</div>
        </div>
      </i-col>-->
      <i-col :sm="24" :md="8" :span="8">
        <div class="icol">
          <div class="ico1TitleLast">今日发送货物总重量</div>
          <div class="icolCountLast">{{topObject.fsTotalWeightToday?topObject.fsTotalWeightToday:'暂无数据'}}</div>
        </div>
      </i-col>
    </Row>
  </div>
</template>
<script>
  import {getStatisticsData} from '@api/stationReport'
  import moment from 'moment'

  export default {
    name: 'trackingCode',
    data () {
      let topObject = {}
      let datas = {topObject}
      return datas
    },
    props: {
      stationCode: {
        type: String,
        default: ''
      }
    },
    methods: {
      getStationInfo () {
        let topInfoParams = {stationCdoe: this.stationCode, startTime: moment().format('YYYY-MM-DD') + ' 00:00:00'}
        getStatisticsData(topInfoParams).then(res => {
          if (res.data.isSuccess === 1) {
            this.topObject = res.data.data
          }
        })
      }
    },
    computed: {},
    mounted () {
      this.getStationInfo()
    }
  }
</script>
<style type="text/css" scoped>
  .Row2 {
    margin: 15px auto;
    background-color: #fff;
  }

  .Row2 .icol {
    width: 100%;
    height: 90px;
    padding: 15px;
  }

  .Row2 .icol .ico1Title {
    width: 100%;
    height: 20px;
    font-size: 14px;
    color: #5E5E5E;
    text-align: center;
    line-height: 20px;
    border-right: 1px solid #E9E9E9;
  }

  .Row2 .icol .icolCount {
    width: 100%;
    height: 40px;
    font-size: 20px;
    color: #669FF1;
    text-align: center;
    line-height: 40px;
    border-right: 1px solid #E9E9E9;
  }

  .Row2 .icol .ico1TitleLast {
    width: 100%;
    height: 20px;
    font-size: 14px;
    color: #5E5E5E;
    text-align: center;
    line-height: 20px;
  }

  .Row2 .icol .icolCountLast {
    width: 100%;
    height: 40px;
    font-size: 20px;
    color: #669FF1;
    text-align: center;
    line-height: 40px;
  }
</style>